﻿using LJ.Abstractions.Pack;
using LJ.Abstractions.Pack.Attributes;
using LJ.FaultHandler.Abstractions.Pack;
using LJ.MobilePush.Abstractions;
using LJ.MobilePush.Abstractions.Pack;
using LJ.MobilePush.Aliyun.Internal;
using Microsoft.Extensions.DependencyInjection;

namespace LJ.MobilePush.Aliyun.Pack;

[DependPack(typeof(IFaultHandlerPack))]
public abstract class MobilePushAliyunPackBase : PackBase, IMobilePushPack
{
    public override void Add(IPackContext packContext)
    {
        packContext.ConfigManager.Add<MobilePushConfig>("MobilePush");
        packContext.DependencyManager.ServiceCollection.AddTransient<IMobilePushFactory,AliyunMobilePushFactory>();
        packContext.DependencyManager.ServiceCollection.AddTransient<IMobilePush, AliyunMobilePush>();
    }

    public override void Use(IPackProvider packProvider)
    {
    }
}
